package chat.bean;

import java.sql.*;

import org.apache.logging.log4j.*;

import chat.*;

public class ChatMsg extends WebObject {
	
	private static final long serialVersionUID = -8589586201990396602L;

	/**
	 * Log4j logger
	 */
	static final Logger logger = LogManager.getLogger(ChatMsg.class);

	static private int MSG_ID = 1;

	private int msgId = MSG_ID++;
	private String msgText = "";
	private Timestamp msgDate = null;
	private transient String userName = "";

	public ChatMsg() {
		msgDate = new Timestamp(System.currentTimeMillis());
	}

	public int getMsgId() {
		return msgId;
	}

	public void setMsgId(int msgId) {
		this.msgId = msgId;
	}

	public String getMsgText() {
		return msgText;
	}

	public void setMsgText(String msgText) {
		this.msgText = this.getConvertKor( msgText );
	}

	public Timestamp getMsgDate() {
		return msgDate;
	}

	public void setMsgDate(Timestamp msgDate) {
		this.msgDate = msgDate;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = this.getConvertKor( userName );
	}
}
